package com.mju.byc.controllers;

import com.mju.byc.Repository.RoleRepository;
import com.mju.byc.pojo.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
public class RoleController {
    @Autowired
    private RoleRepository roleRepository;
    @RequestMapping("/get")
    public List<Role> get() {
        return roleRepository.findAll();
    }
}
